-
-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat[perf]: optimize optimizer #3782
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3782 +/- ##
==========================================
- Coverage 91.08% 85.03% -6.06%
==========================================
Files 106 92 -14
Lines 15315 13722 -1593
Branches 3368 3081 -287
==========================================
- Hits 13950 11668 -2282
- Misses 928 1566 +638
- Partials 437 488 +51 ☔ View full report in Codecov by Sentry. |
i checked whether caching (vyper) ~/vyper $ git grep "\.args\[.* = "
vyper/ir/compile_ir.py: ir_node.args[0].value = "pass"
vyper/ir/compile_ir.py: ir_node.args[1].value = "pass"
vyper/ir/compile_ir.py: withargs[code.args[0].value] = height
vyper/ir/compile_ir.py: withargs[code.args[0].value] = old
(vyper) ~/vyper $ git grep "\.args ="
tests/functional/codegen/features/test_logging_from_call.py: assert logs[0].args == logs[1].args
tests/functional/codegen/features/test_logging_from_call.py: assert logs[0].args == logs[1].args
vyper/ast/parse.py: fn_node.args = python_ast.arguments(defaults=[])
vyper/codegen/ir_node.py: self.args = args
vyper/codegen/ir_node.py: ret.args = [copy.deepcopy(arg) for arg in ret.args]
vyper/codegen/ir_node.py: and self.args == other.args
vyper/ir/compile_ir.py: ir_node.args = IRnode.from_list(_t, source_pos=ir_node.source_pos).args
vyper/ir/optimizer.py: return x.args == y.args == [] and x.value == y.value and not x.is_complex_ir
vyper/venom/function.py: self.args = [] |
i guess dunder things don't get into the __dict__ object?
9851403
to
c597129
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like explicit caching where you can see easily that things get cached and clearly when caches are/need to be invalidated. @cachedproperty
scares me :)
closing this, we are planning to axe the old IR pipeline anyway so we don't really need to focus on improvements to it. |
What I did
improve compilation-time by 10-15%, but it's a little gross
How I did it
How to verify it
Commit message
Commit message for the final, squashed PR. (Optional, but reviewers will appreciate it! Please see our commit message style guide for what we would ideally like to see in a commit message.)
Description for the changelog
Cute Animal Picture